home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / pas_all.zip / TI343.ASC < prev    next >
Text File  |  1992-08-12  |  1KB  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.   PRODUCT : TURBO PASCAL                               NUMBER : 343
  10.   VERSION : 2.00
  11.        OS : CP/M-80
  12.      DATE : November 4, 1986                             PAGE : 1/1
  13.     TITLE : RELEASE UPDATE
  14.  
  15.  
  16.  
  17.  
  18.   This is a work-around  for  a problem in the Release procedure of
  19.   version  2.00  of  Turbo Pascal. Use this  procedure  instead  of
  20.   Release.
  21.  
  22.  
  23.   type
  24.     IntPtr = ^integer;
  25.  
  26.   procedure NewRelease(OldHeapPtr : IntPtr);
  27.  
  28.   var
  29.     I : integer;
  30.     X, Y : real;
  31.  
  32.   begin
  33.     if HeapPtr < 0 then
  34.       X := 65536.0 + HeapPtr
  35.     else
  36.       X := HeapPtr;
  37.     I := Addr(OldHeapPtr^);
  38.     if I < 0 then
  39.       Y := 65536.0 + I
  40.     else
  41.       Y := I;
  42.     I := Round(X - Y);
  43.     FreeMem(OldHeapPtr, I);
  44.   end; { NewRelease }
  45.  
  46.   DISCLAIMER: You  have the right to use this technical information
  47.   subject to the terms  of  the  No-Nonsense License Statement that
  48.   you received with  the  Borland product to which this information
  49.   pertains.
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.